package com.lucy.dingding.controller;

import com.lucy.common.domain.ResponseDTO;
import com.lucy.dingding.core.DingAppToken;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author kindear
 */
@RestController
@RequestMapping("ding")
@Api(tags = "钉钉-核心服务")
public class DingAppCoreController {
    @Autowired
    DingAppToken appToken;

    @GetMapping("token")
    @ApiOperation(value = "TOKEN获取",notes = "")
    public ResponseDTO<Object> tokenGet(){
        return ResponseDTO.succData(
                appToken.get()
        );
    }
}
